package com.nf;

public class TaxUtilImpl2 implements ITaxUtil{
//    private static final float RATE = 0.2f;
//    private static final float START = 5000.0f;
    private float rate;
    private float start;
    public void setRate(float rate) {
        this.rate = rate;
    }
    public void setStart(float start) {
        this.start = start;
    }

    @Override
    public float calcTax(float e) {
        if (e<=start){
            return 0.0f;
        }else {
            return (e-start) * rate;
        }
    }
}
